﻿using System;
using System.Collections.Generic;
using System.Text;

namespace DEEBCG.ExternalLib.CompanyAPI.Model
{
    /// <summary>
    /// 呼吸阻塞报表信息
    /// </summary>
    public class BreatheApneaReportInfo
    {
        /// <summary>
        /// 周期开始时间
        /// </summary>
        public DateTime Time
        {
            set;
            get;
        }

        /// <summary>
        /// 出现呼吸阻塞次数
        /// </summary>
        public int Count
        {
            set;
            get;
        } = 0;

        /// <summary>
        /// 最大呼吸阻塞时长
        /// </summary>
        public int MaxApneaSecond
        {
            set;
            get;
        } = 0;

        /// <summary>
        /// 最长呼吸阻塞发生时间
        /// </summary>
        public DateTime MaxApneaHappend
        {
            set;
            get;
        } = default(DateTime);

        /// <summary>
        /// 时长统计（阻塞时长[取整],次数）
        /// </summary>
        public Dictionary<double, int> DurationStatistics
        {
            set;
            get;
        } = new Dictionary<double, int>();


        /// <summary>
        /// 区间时长（秒,默认1小时）
        /// </summary>
        public double Interval { set; get; } = 3600;


        /// <summary>
        /// 获取副本
        /// </summary>
        /// <returns></returns>
        public BreatheApneaReportInfo Clone()
        {
            return (BreatheApneaReportInfo)this.MemberwiseClone();
        }
    }
}
